package com.wanxi.exercises;

import java.util.Scanner;
public class MinOfThree {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.print("请输入第一个数：");
        int num1 = scanner.nextInt();
        System.out.print("请输入第二个数：");
        int num2 = scanner.nextInt();
        System.out.print("请输入第三个数：");
        int num3 = scanner.nextInt();
        int temp = num1 < num2 ? num1 : num2;
        int theMin = num3 < temp ? num3 : temp;
        System.out.println("最小的数是：" + theMin);
        scanner.close();
    }
}
